﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Graphics;

namespace Terraria.UI.Chat
{
	// Token: 0x0200012C RID: 300
	public class TextSnippet
	{
		// Token: 0x06000D08 RID: 3336 RVA: 0x0000D1C6 File Offset: 0x0000B3C6
		public TextSnippet(string text = "")
		{
			this.Text = text;
			this.TextOriginal = text;
		}

		// Token: 0x06000D09 RID: 3337 RVA: 0x0000D1F2 File Offset: 0x0000B3F2
		public TextSnippet(string text, Color color, float scale = 1f)
		{
			this.Text = text;
			this.TextOriginal = text;
			this.Color = color;
			this.Scale = scale;
		}

		// Token: 0x06000D0A RID: 3338 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void Update()
		{
		}

		// Token: 0x06000D0B RID: 3339 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnHover()
		{
		}

		// Token: 0x06000D0C RID: 3340 RVA: 0x00006B58 File Offset: 0x00004D58
		public virtual void OnClick()
		{
		}

		// Token: 0x06000D0D RID: 3341 RVA: 0x0000D22C File Offset: 0x0000B42C
		public virtual Color GetVisibleColor()
		{
			return ChatManager.WaveColor(this.Color);
		}

		// Token: 0x06000D0E RID: 3342 RVA: 0x0000D239 File Offset: 0x0000B439
		public virtual bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = default(Vector2), Color color = default(Color), float scale = 1f)
		{
			size = Vector2.Zero;
			return false;
		}

		// Token: 0x06000D0F RID: 3343 RVA: 0x003F6EEC File Offset: 0x003F50EC
		public virtual TextSnippet CopyMorph(string newText)
		{
			TextSnippet textSnippet = (TextSnippet)base.MemberwiseClone();
			textSnippet.Text = newText;
			return textSnippet;
		}

		// Token: 0x06000D10 RID: 3344 RVA: 0x0000D247 File Offset: 0x0000B447
		public virtual float GetStringLength(DynamicSpriteFont font)
		{
			return font.MeasureString(this.Text).X * this.Scale;
		}

		// Token: 0x0400119B RID: 4507
		public string Text;

		// Token: 0x0400119C RID: 4508
		public string TextOriginal;

		// Token: 0x0400119D RID: 4509
		public Color Color = Color.White;

		// Token: 0x0400119E RID: 4510
		public float Scale = 1f;

		// Token: 0x0400119F RID: 4511
		public bool CheckForHover;

		// Token: 0x040011A0 RID: 4512
		public bool DeleteWhole;
	}
}
